package cn.xuewenbao.edu.service;

import cn.xuewenbao.edu.entity.Book;
import cn.xuewenbao.edu.entity.vo.*;
import com.baomidou.mybatisplus.extension.service.IService;
import org.jeecg.common.api.vo.Result;

import java.util.List;

/**
 * <p>
 * 讲书表 服务类
 * </p>
 *
 * @author mafayu
 * @since 2021-03-30
 */
public interface BookService extends IService<Book> {

    //获取讲书列表
    List<BookInfoVo> listAllArticle();

    //根据用户id获取荐书列表
    List<BookIndexVo> listIndexBook(String userId);

    //根据讲书id获取讲书详情-音频
    Result<BookDetailAudioVo> getBookAudioDetail(String bookId, String userId);

    //根据讲书id获取讲书详情-视频
    Result<BookDetailVideoVo> getBookVideoDetail(String bookId, String userId);

    //根据讲书id获取讲书购买链接
    Result<BookBuyLink> getBookBuyLink(String bookId);

    //添加讲书
    Result<?> addBook(BookPulishVo bookPulishVo);

    //根据id删除讲书
    Result<?> deleteBook(String bookId);

    //根据id和作者id删除讲书
    Result<?> deleteOwnBook(String bookId, String userId);

    List<BookInfoVo> getCreateBookList(String userId);
}
